package org.gp.demo.timer.timerfactory;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

import org.gp.demo.timer.task.DemoTask;

public class DemoTimer extends Timer {

	public int status;
	public String name;

	public void init(String name) {
		this.status = 0;
		this.name = !"".equals(name) ? name : this.toString();
	}

	public void startTimer(DemoTask task, long startDate) {
		task.demoTimer = this;
		this.schedule(task, 0, startDate);
	}

	public void stopTimer() {
		this.cancel();
	}
}
